var li=document.getElementsByClassName("nav")[0].children;/*返回Elements多个name数组加[0]*/
window.onload = function(){
    
    for(var i= 0;i<li.length;i++){
        bgcChange(li[i]);
    }
}

function bgcChange(obj){
	/*JS遍历判断点击事件css判断hover样式*/
	
	obj.onmousedown=function(){
		for (var i = 0; i < li.length; i++) {
				obj.className=" ";
			}
		obj.className="show";
	}
}












	/*obj.onmousedown=function(){
		obj.className="show";
	}
	obj.onmouseout=function(){
		obj.className="";
	}*/

